package org.example.domain.auth.adapter.repository;


import org.example.domain.auth.model.entity.UserEntity;

import java.util.Map;

/**
 * @author yinghuashen
 * @version 1.0
 * @description:
 * @date 2025/3/4 10:13
 */

public interface IAuthRepository {

    void insertUser(UserEntity userEntity);

    UserEntity getUserPwdByPhone(String userPhone);

    UserEntity getUserBasicInfoByPhone(String userPhone);

    void saveCode(String phone, String code);

    String getCachedCode(String phone);

    void saveUserInfoIntoCache(String token, Map<String, Object> userBasicInfoMap);

    String getUserToken(String phone);

    void refreshUserJWTToken(String phone);

    Map<String, String> getUserBasicInfoByToken(String token);
}
